package net.starwifi.duobao.service.impl;


import net.starwifi.duobao.entity.PluginConfig;
import net.starwifi.duobao.repository.PluginConfigRepository;
import net.starwifi.duobao.service.BaseServiceImpl;
import net.starwifi.duobao.service.PluginConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


/**
 * Service - 插件配置
 * 
 * @author ruoo
 * @version 1.0
 */
@Service("pluginConfigServiceImpl")
public class PluginConfigServiceImpl extends BaseServiceImpl<PluginConfig, Long> implements PluginConfigService {


	@Autowired
	PluginConfigRepository repository;

	@Transactional(readOnly = true)
	public boolean pluginIdExists(String pluginId) {
		PluginConfig entity=repository.findByPluginId(pluginId);
		return entity==null?false:true;
	}

	@Transactional(readOnly = true)
	public PluginConfig findByPluginId(String pluginId) {
		return repository.findByPluginId(pluginId);
	}

}